#version 450

//enable #include
#extension GL_GOOGLE_include_directive : enable
#extension GL_EXT_nonuniform_qualifier : require

#include "PBRCommon.h"


layout (input_attachment_index = 0, binding = 0) uniform subpassInput samplerAlbedo;
layout (input_attachment_index = 1, binding = 1) uniform subpassInput samplerposition;
layout (input_attachment_index = 2, binding = 2) uniform subpassInput samplerNormal;
layout (input_attachment_index = 3, binding = 3) uniform subpassInput samplerMisc;


layout (location = 0) out vec4 outColor;

#define CascadeNum 4

layout (push_constant) uniform SAmbientLightDefferShading
{
    vec4 ColorMultipliedByIntensity;
} PushConstants;

void main() 
{
    outColor=
        vec4(
            PushConstants.ColorMultipliedByIntensity.xyz
            * subpassLoad(samplerAlbedo).xyz
        ,1.0);
}